dist: xenial
compiler: gcc
language: cpp

before_install:
  # C++17
  - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
  - sudo apt-get update -qq

install:
  # C++17
  - sudo apt-get install -qq g++-8 libpthread-stubs0-dev
  - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90

os: linux
addons:
  apt:
#    sources:
#      - ubuntu-toolchain-r-test
#      - llvm-toolchain-trusty-6.0
#      - sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main'
#      - key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
    packages:
      - gcc
      - g++
      - cmake
#      - clang-6.0
      - libstdc++6
      - libpng-dev
      - build-essential

script:
  - export CC=gcc
  - export CXX=g++
#  - sudo ./scripts/linux/dependencies.sh
#  - sudo ./scripts/linux/install_SFML_dependencies.sh
  - export MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
#  - export LINKER_FLAGS="-stdlib=libc++ -lc++abi"
  - cmake --version
  - gcc --version
  - g++ --version
  - mkdir build
  - cd build
  - cmake -G "Unix Makefiles" .. -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON -DBUILD_TMXL_TEST_ONLY=ON
  - cmake --build .
